/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ${USER}
 * Date: ${YEAR}-${MONTH}-${DAY}
 * Time: ${TIME}
 */
public class Main {
    public static void main(String[] args) {
        System.out.println("Hello world!");
    }
}
class Solution {
    public int removeDuplicates(int[] nums) {
        int fast = 0;
        int slow = 1;
        int count = 0;
        for(fast=1;fast<nums.length;fast++) {
            if(nums[fast - 1]!=nums[fast]) {
                nums[slow] = nums[fast];
                slow++;
            }
        }
        return slow;
    }
}